<div class="tales_stats_menu">
    <ui>
        <li class="tales_of_deonia"><?php echo __(LANG_FANTASY_HERO)?></li>
    </ui>
</div>

<div class="tales_div_search_main">
    <div><?php echo $this->Form->create('search_user');?></div>
    <div class="input_div">
        <?php echo $this->Form->input('account', array(
            'rule' => 'notEmpty',
            'label' => false,
            'type' => 'text',
            'value' => empty($search_info['account'])?'':$search_info['account'],
        ));?>
    </div>
    <div class="search_div_button">
        <?php echo $this->Form->end(__(LANG_SEARCH));?>
    </div>
    <div class="search_table">
        <table>
            <tr>
                <th style="width: 80px"><?php echo __(LANG_NUM)?></th>
                <th style="width: 80px"><?php echo __(LANG_ACCOUNT_NAME)?></th>
                <th style="width: 80px"><?php echo __(LANG_CRYSTAL)?></th>
                <th style="width: 80px"><?php echo __(LANG_LAST_SAVE)?></th>
                <th style="width: 80px"><?php echo __(LANG_CREATE_ACCOUNT)?></th>
                <th style="width: 80px"><?php echo __(LANG_PLAY_TIME)?></th>
                <th style="width: 80px"><?php echo __(LANG_GRADE)?></th>
                <th style="width: 80px"><?php echo __(LANG_VERSION)?></th>
                <th style="width: 80px"><?php echo __(LANG_DAILY_REWARD_COUNT)?></th>
                <th style="width: 80px"><?php echo __(LANG_TUTORIAL)?></th>
                <th style="width: 80px"><?php echo __(LANG_BANNED)?></th>
                <th style="width: 80px"><?php echo __(LANG_OS)?></th>
            </tr>
            <?php if(!empty($user_list)) {?>
                <?php $num = ''; $count = count($user_list);?>
                <?php foreach($user_list as $num => $value) {?>
                    <tr>
                        <td class="user_link">
                            <?php echo  $count-- ?>
                        </td>
                        <td class="user_link">
                            <?php echo  $this->Html->link($value['tbl_account']['account'], array('action' => 'user_select', 'id' => $value['tbl_account']['_id'], 'search_value' => $search_info['account'])); ?>
                        </td>
                        <td class="user_link">
                            <?php echo $value['tbl_account']['crystal']?>
                        </td>
                        <td class="user_link">
                            <?php
                            $my_date = $value['tbl_account']['modified'];
                            $fecha = date(preg_replace('`(?<!\\\\)u`', $my_date->usec, 'Y-M-d H:i:s.u'), $my_date->sec);
                            echo  $fecha ;
                            ?>
                        </td>
                        <td class="user_link">
                            <?php
                            $my_date2 = $value['tbl_account']['created'];
                            $fecha2 = date(preg_replace('`(?<!\\\\)u`', $my_date2->usec, 'Y-M-d H:i:s.u'), $my_date2->sec);
                            echo  $fecha2 ;
                            ?>
                        </td>
                        <td class="user_link">
                            <?php echo  $value['tbl_account']['play_time'] ?>
                        </td>
                         <td class="user_link">
                            <?php echo  $value['tbl_account']['grade'] ?>
                        </td>
                        <td class="user_link">
                            <?php echo  $value['tbl_account']['version'] ?>
                        </td>
                        <td class="user_link">
                            <?php echo  $value['tbl_account']['daily_reward_count'] ?>
                        </td>
                        <td class="user_link">
                            <?php echo  $value['tbl_account']['tutorial'] ?>
                        </td>
                        <td class="user_link">
                            <?php echo  var_dump((int)$value['tbl_account']['banned'])?>
                        </td>
                        <td class="user_link">
                            <?php echo  $value['tbl_account']['os'] ?>
                        </td>
                    </tr>
                <?php }?>
            <?php }?>

        </table>
        <?php if(!empty($err_msg)) {?>
            <p class="info_empty_text tales_of_deonia_err"><?php echo __($err_msg)?></p>
        <?php }?>
    </div>
</div>


